package com.oss.model;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * @author xueqiang.mi
 * @since 2010-7-14
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Task {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private String link;

	@Persistent
	private String source;

	@Persistent
	private String type;

	@Persistent
	private String status = "ready";

	@Persistent
	private Date createdDate = new Date();

	public Task(String link, String source, String type) {
		super();
		this.link = link;
		this.source = source;
		this.type = type;

	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public Long getId() {
		return id;
	}

	public String getLink() {
		return link;
	}

	public String getSource() {
		return source;
	}

	public String getStatus() {
		return status;
	}

	public String getType() {
		return type;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public void setType(String type) {
		this.type = type;
	}

}
